require 'family_tree_api/client'
module ClientHelper
  def get_client
    @client = FamilyTreeApi::Client.new 'http://www.dev.usys.org', 'MMMM-MMMM-MMMM-MMMM-MMMM-MMMM-MMMM-MMMM', 'Ruby-Fs-Api/TESTS'
    @client.session = 'USYS2AADBB47B3A6043209CBE16725938464.ptap009-035'
  end
  
  # Creates an instance variable @com that represents the 
  # HTTPCommunicator, so that you can make mock/stub calls 
  # to the web service
  def get_stubbed_client
    
    @com = mock('HttpCommunicator')
    FamilyTreeApi::HttpCommunicator.stub!(:new).and_return(@com)
    get_client
  end
end